package practice.annotaion.spring.entrance;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component("viewer")
public class ViewerMonitor implements Viewer {

	// 자동 설정 적용
	@Autowired
	private DisplayStrategy displayStrategy;

	public void setDisplayStrategy(DisplayStrategy displayStrategy) {
		this.displayStrategy = displayStrategy;
	}

	@Override
	public void draw() {
		System.out.println("DisplayType "
				+ displayStrategy.getDisplayType().name() + "로카메라 이미지 출력");
	}

	@Override
	public void add(Camera camera) {
		System.out.println("MonitorViewer에  " + camera + " 영상 추가");
	}
}
